import Layout from '@/layouts'
import BaseRoute from '@/router/modules/BaseRoute'
import PlatformRoute from '@/router/modules/PlatformRoute'
import MallRoute from '@/router/modules/MallRoute'
import OrderRoute from '@/router/modules/OrderRoute'
import CrmRoute from '@/router/modules/CrmRoute'
import SystemRoute from '@/router/modules/SystemRoute'
import ActivityRoute from '@/router/modules/ActivityRoute'
import LinkRoute from '@/router/modules/LinkRoute'

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/login',
    component: () => import('@/views/pages/login'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/pages/404'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/modules/dashboard/index'),
      meta: { title: 'Dashboard', icon: 'dashboard' }
    }]
  },
]

/**
 * 异步:动态路由
 */
export const asyncRouterMap = [
	BaseRoute,
	PlatformRoute,
	MallRoute,
	OrderRoute,
	CrmRoute,
	SystemRoute,
	ActivityRoute,
	LinkRoute
]
